package a.f.l.a;

import a.d.n;
import a.d.w;
import a.f.tb;

public abstract class d
{
  public static final byte a = -1;
  public static final byte b = 1;
  public static final byte c = 0;
  private static final double e = 1.0E-006D;
  private double f;
  private boolean g;
  private final tb i;
  private final b_ j;
  private eb k;
  private eb l;
  private final eb m;
  private pc n;
  private byte o = 0;
  public static boolean p;
  
  protected d(a.c.d paramd, int paramInt, tb paramtb, eb parameb1, eb parameb2, eb parameb3)
  {
    this.i = paramtb;
    this.j = new b_(paramd, paramInt, null);
    this.g = false;
    this.k = parameb1;
    this.l = parameb2;
    this.m = parameb3;
  }
  
  protected d(a.c.d paramd, int paramInt, n paramn)
  {
    this.i = c(paramn);
    this.j = new b_(paramd, paramInt, null);
    this.f = a(paramn);
    this.k = new eb(this.f, this.f);
    this.l = (this.m = b(paramn));
    this.g = true;
  }
  
  public String toString()
  {
    if (!sb.e) {}
    return "SegmentInfo{" + (i() != null ? "edge=" + i().e().f() + "->" + i().f().f() : "grouped Segment") + ", segmentIndex=" + j() + ", direction=" + this.i + ", location range=" + this.k + ", min extension=" + this.l + ", max extension=" + this.m + '}';
  }
  
  static double a(n paramn)
  {
    w localw = paramn.d();
    if (!sb.e) {}
    int i1 = Math.abs(localw.a - paramn.e().a) < 1.0E-006D ? 1 : 0;
    if (i1 != 0) {
      return localw.a;
    }
    return localw.b;
  }
  
  static eb b(n paramn)
  {
    w localw1 = paramn.d();
    w localw2 = paramn.e();
    if (!sb.e) {}
    int i1 = Math.abs(localw1.a - localw2.a) < 1.0E-006D ? 1 : 0;
    if (i1 != 0) {
      return new eb(localw1.b, localw2.b);
    }
    return new eb(localw1.a, localw2.a);
  }
  
  static tb c(n paramn)
  {
    boolean bool = sb.e;
    w localw1 = paramn.d();
    w localw2 = paramn.e();
    if (!bool) {
      if (localw1.a > localw2.a + 1.0E-006D) {
        return tb.d;
      }
    }
    if (!bool) {
      if (localw1.a + 1.0E-006D < localw2.a) {
        return tb.b;
      }
    }
    if (!bool) {
      if (localw1.b > localw2.b + 1.0E-006D) {
        return tb.a;
      }
    }
    if (localw1.b + 1.0E-006D < localw2.b) {
      return tb.c;
    }
    throw new RuntimeException("could not determine direction for segment " + paramn);
  }
  
  public eb a()
  {
    return this.l;
  }
  
  void a(eb parameb)
  {
    this.l = parameb;
  }
  
  public eb b()
  {
    return this.m;
  }
  
  public eb c()
  {
    return this.k;
  }
  
  void b(eb parameb)
  {
    this.k = parameb;
  }
  
  public byte d()
  {
    return this.o;
  }
  
  public void a(byte paramByte)
  {
    if (!sb.e) {}
    switch (paramByte)
    {
    case -1: 
    case 0: 
    case 1: 
      this.o = paramByte;
      if (sb.d == 0) {
        break;
      }
    default: 
      throw new IllegalArgumentException("unknown alignment " + paramByte);
    }
  }
  
  public void a(double paramDouble)
  {
    boolean bool = sb.e;
    if (!bool) {
      if (f()) {
        throw new IllegalStateException("try to change location for a fixed segment");
      }
    }
    if (!bool)
    {
      if (this.k.a() - 1.0E-006D <= paramDouble) {
        if (bool) {
          break label115;
        }
      }
    }
    else {
      if (this.k.b() + 1.0E-006D >= paramDouble) {
        break label109;
      }
    }
    throw new IllegalArgumentException("location " + paramDouble + " does not lie in location range " + this.k + "!");
    label109:
    this.f = paramDouble;
    label115:
    this.g = true;
  }
  
  public double e()
  {
    return this.f;
  }
  
  public boolean f()
  {
    return this.g;
  }
  
  public boolean g()
  {
    return this.i.e();
  }
  
  public tb h()
  {
    return this.i;
  }
  
  public a.c.d i()
  {
    return this.j.a;
  }
  
  public int j()
  {
    return this.j.b;
  }
  
  void a(int paramInt)
  {
    this.j.b = paramInt;
  }
  
  private b_ k()
  {
    return this.j;
  }
  
  public void a(pc parampc)
  {
    this.n = parampc;
    this.k = parampc.a();
  }
  
  public pc l()
  {
    return this.n;
  }
  
  private static class b_
  {
    private a.c.d a;
    private int b;
    
    private b_(a.c.d paramd, int paramInt)
    {
      this.a = paramd;
      this.b = paramInt;
    }
    
    public boolean equals(Object paramObject)
    {
      boolean bool = sb.e;
      if (!bool) {
        if (this == paramObject) {
          return true;
        }
      }
      if (paramObject != null)
      {
        if (bool) {
          break label37;
        }
        if (getClass() == paramObject.getClass()) {}
      }
      else
      {
        return false;
      }
      label37:
      b_ localb_ = (b_)paramObject;
      if (!bool) {
        if (this.b != localb_.b) {
          return false;
        }
      }
      if ((bool) || ((this.a == null) || (!bool))) {
        if ((!this.a.equals(localb_.a)) && ((goto 97) || (localb_.a != null))) {
          return false;
        }
      }
      return true;
    }
    
    public int hashCode()
    {
      int i = (sb.e) || (this.a != null) ? this.a.hashCode() : 0;
      i = 31 * i + this.b;
      return i;
    }
    
    public static b_ a(a.c.d paramd, int paramInt)
    {
      return new b_(paramd, paramInt);
    }
    
    b_(a.c.d paramd, int paramInt, d.0 param0)
    {
      this(paramd, paramInt);
    }
  }
}
// INTERNAL ERROR //


/* Location:           E:\idea\

 * Qualified Name:     a.f.l.a.d

 * JD-Core Version:    0.7.0.1

 */